/* 全局样式 */

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* 卡片阴影 */
.card-shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.card-shadow:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 响应式布局 */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .task-filter {
    flex-direction: column;
  }
  
  .task-card {
    padding: 15px;
  }
  
  .task-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .task-actions button {
    width: 100%;
  }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(64, 158, 255, 0.3);
  border-radius: 50%;
  border-top-color: #409eff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #909399;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 16px;
  margin-bottom: 10px;
}

.empty-state-hint {
  font-size: 14px;
  color: #c0c4cc;
}

/* 优先级标签 */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.priority-badge.high {
  background-color: #fef0f0;
  color: #f56c6c;
}

.priority-badge.medium {
  background-color: #fdf6ec;
  color: #e6a23c;
}

.priority-badge.low {
  background-color: #f0f9ff;
  color: #67c23a;
}

/* 状态标签 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.todo {
  background-color: #f4f4f5;
  color: #909399;
}

.status-badge.in-progress {
  background-color: #ecf5ff;
  color: #409eff;
}

.status-badge.completed {
  background-color: #f0f9ff;
  color: #67c23a;
}

/* 工具提示 */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background-color: #303133;
  color: white;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 8px;
}

.button-group button {
  flex: 1;
}

/* 表单优化 */
.el-form-item {
  margin-bottom: 22px;
}

.el-input__inner,
.el-textarea__inner {
  transition: all 0.3s;
}

.el-input__inner:focus,
.el-textarea__inner:focus {
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 对话框优化 */
.el-dialog {
  border-radius: 8px;
  overflow: hidden;
}

.el-dialog__header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.el-dialog__body {
  padding: 20px;
}

/* 消息提示优化 */
.el-message {
  min-width: 300px;
  border-radius: 8px;
}

/* 标签优化 */
.el-tag {
  border-radius: 4px;
  padding: 0 10px;
  height: 24px;
  line-height: 22px;
}
